<div id="appDialogRegister" v-cloak>
    <el-dialog title="售后登记" :visible.sync="dialogRegisterVisible" @closed="closeDialogRegister" fullscreen>
        <div class="panel panel-default">
            <form class="form-horizontal" style="width: auto">
                <div class="form-group ">
                    <div class="col-sm-2 control-label "><label><span style="color: red;">* </span>售后类型</label></div>
                    <div class="col-sm-4">
                        <el-select v-model="serviceRegister.srType" @change="srTypeChange"  placeholder="请选择" size="small"  style="width: 100%;" >
                            <el-option
                                    v-for="item in serviceTypeEnum"
                                    :disabled="item.disabled"
                                    :key="item.id"
                                    :label="item.describe"
                                    :value="item.id">
                            </el-option>
                        </el-select>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><label><span style="color: red;">* </span>客户网名</label></div>
                    <div class="col-sm-4">
                        <span class="form-control input-sm">{{serviceRegister.srName}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><label><span style="color: red;">* </span>销售订单号</label> </div>
                    <div class="col-sm-4">
                        <span class="form-control input-sm">{{serviceRegister.srOrderId}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><label><span style="color: red;">* </span>售后原因</label> </div>
                    <div class="col-sm-6">
                        <el-checkbox-group v-model="srReasonTemp">
                            <div class="row">
                                <div class="col-sm-4">
                                    <el-checkbox label="物流运输过程中造成损坏"></el-checkbox>
                                </div>
                                <div class="col-sm-4">
                                    <el-checkbox label="设计文件存在严重缺陷,造成生产错误"></el-checkbox>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-4">
                                    <el-checkbox label="商品送错退回"></el-checkbox>
                                </div>
                                <div class="col-sm-4">
                                    <el-checkbox label="业务员态度不好" ></el-checkbox>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-4">
                                    <el-checkbox label="生产商质量差,与展示不相符" ></el-checkbox>
                                </div>
                                <div class="col-sm-4">
                                    <el-checkbox label="其它原因" >
                                        <div class="form-inline">
                                            <span> 其它原因</span>
                                            <input type="text" style="height:30px;width: 150px" class="form-control input-xs" v-model="serviceRegister.srOtherReason" >
                                        </div>
                                    </el-checkbox>
                                </div>
                            </div>
                        </el-checkbox-group>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><label>备注</label> </div>
                    <div class="col-sm-4">
                        <input type="text" class="form-control input-sm" v-model="serviceRegister.srRemark" placeholder="备注"/>
                    </div>
                </div>

                <!--退款相关信息-->
                <div v-show="showRefund">
                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>退款金额</label></div>
                        <div class="col-sm-4">
                            <input type="text" disabled @change="validAmount" class="form-control input-sm" v-model="serviceRefunds.srRefundAmount" placeholder="退款金额"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label"><label>退款路径</label></div>
                        <div class="col-sm-4" >
                            <el-radio v-model="serviceRefunds.srRefundPath"  :label="1">原路退回</el-radio>
                            <el-radio v-model="serviceRefunds.srRefundPath"  :label="2">其它</el-radio>
                        </div>
                    </div>

                    <div class="form-group" v-show="showSrAccountType">
                        <div class="col-sm-2 control-label"><label>账户类型</label></div>
                        <div class="col-sm-4" >
                            <el-radio v-model="serviceRefunds.srAccountType" :label="1">银行卡</el-radio>
                            <el-radio v-model="serviceRefunds.srAccountType"  :label="2">支付宝</el-radio>
                        </div>
                    </div>

                    <!--显示银行卡信息-->
                    <div v-show="showSrBankInfo">
                        <div class="form-group" >
                            <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>银行卡号</label></div>
                            <div class="col-sm-4" >
                                <input type="text" class="form-control input-sm" v-model="serviceRefunds.srBankCode" placeholder="银行卡号"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>持卡人</label></div>
                            <div class="col-sm-4" >
                                <input type="text" class="form-control input-sm" v-model="serviceRefunds.srBankCardholder" placeholder="持卡人姓名"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>银行名称</label></div>
                            <div class="col-sm-4" >
                                <input type="text" class="form-control input-sm" v-model="serviceRefunds.srBankName" placeholder="银行名称"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <div class="col-sm-2 control-label"><label>开户行</label></div>
                            <div class="col-sm-4" >
                                <input type="text" class="form-control input-sm" v-model="serviceRefunds.srBankOpen" placeholder="开户行,务必正确"/>
                            </div>
                        </div>

                    </div>

                    <!--显示支付宝信息-->
                    <div v-show="showAlipayInfo">
                        <div class="form-group" >
                            <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>支付宝账号</label></div>
                            <div class="col-sm-4" >
                                <input type="text" class="form-control input-sm" v-model="serviceRefunds.srAlipayCode" placeholder="支付宝账号"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>姓名</label></div>
                            <div class="col-sm-4" >
                                <input type="text" class="form-control input-sm" v-model="serviceRefunds.srAlipayName" placeholder="支付宝开户姓名"/>
                            </div>
                        </div>
                    </div>
                </div>

                <!--显示运费相关信息-->
                <div v-show="showFreight">
                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><label>运费形式</label></div>
                        <div class="col-sm-5" >
                            <el-radio v-model="serviceRegister.srFreightForm"  :label="1">无</el-radio>
                            <el-radio v-model="serviceRegister.srFreightForm"  :label="2">紫云网</el-radio>
                            <el-radio v-model="serviceRegister.srFreightForm" :label="3">商家</el-radio>
                            <el-radio v-model="serviceRegister.srFreightForm"  :label="4">用户</el-radio>
                            <el-radio v-model="serviceRegister.srFreightForm" :label="5">AA</el-radio>
                        </div>
                    </div>

                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><label>运费金额</label></div>
                        <div class="col-sm-4" >
                            <input type="text" class="form-control input-sm" v-model="serviceRegister.srFreightAmount" placeholder="请输入运费金额"/>
                        </div>
                    </div>
                </div>

                <!--显示退货仓库相关信息-->
                <div v-show="showSrgStock">
                    <div class="form-group">
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>退货仓库</label> </div>
                        <div class="col-sm-4">
                            <el-select v-model="serviceRegister.srReturnStockId"   placeholder="请选择" size="small" style="width: 100%" >
                                <el-option
                                        v-for="item in srStockList"
                                        :key="item.stockId"
                                        :label="item.stockName"
                                        :value="item.stockId">
                                </el-option>
                            </el-select>
                        </div>
                    </div>

                </div>

                <!--显示收货相关信息-->
                <div v-show="showReceive">
                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>收货人姓名</label></div>
                        <div class="col-sm-4" >
                            <input type="text" class="form-control input-sm" v-model="serviceRegister.srReceiveName" placeholder="收货人姓名"/>
                        </div>
                    </div>

                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>收货人电话</label></div>
                        <div class="col-sm-4" >
                            <input type="text" class="form-control input-sm" v-model="serviceRegister.srReceiveMobile" placeholder="收货人电话"/>
                        </div>
                    </div>

                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>收件地区</label></div>
                        <div class="col-sm-4">
                            <el-cascader placeholder="试试搜索：武汉市" size="small" filterable
                                         style="width: 100%"
                                         :options="regionsSascade"
                                         @change="handleRegionsSascadeChange">

                            </el-cascader>
                        </div>
                    </div>

                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>详细地址</label></div>
                        <div class="col-sm-4" >
                            <input type="text" class="form-control input-sm" v-model="serviceRegister.srReceiveAddress" placeholder="收件人所在详细地址"/>
                        </div>
                    </div>

                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><label>地区编码</label></div>
                        <div class="col-sm-4" >
                            <input type="text" class="form-control input-sm" v-model="serviceRegister.srReceiveAreaCode" placeholder="收件地区编码"/>
                        </div>
                    </div>


                </div>

                <!--显示订单明细-->
                <div v-show="showOrderItem">

                    <div class="form-group " >
                        <div class="col-sm-2 control-label"><span style="color: red;">* </span><label>订单明细</label></div>
                        <div class="col-sm-7">
                            <el-table border stripe ref="multipleTable" :data="erpOrderItem"
                                      @selection-change="orderItemSelectionChange"
                                      tooltip-effect="dark" size="mini" height="300">
                                <el-table-column type="selection"  width="55"></el-table-column>
                                <el-table-column prop="name" label="商品名称"  fixed show-overflow-tooltip> </el-table-column>
                                <el-table-column prop="addon" label="规格属性"  show-overflow-tooltip> </el-table-column>
                                <el-table-column prop="productId" label="商品编号" width="100"> </el-table-column>
                                <el-table-column prop="unit" label="单位" width="60"> </el-table-column>
                                <el-table-column prop="craftsNames" label="工艺" width="120"> </el-table-column>
                                <el-table-column prop="nums" label="数量" width="100" fixed="right">
                                    <template slot-scope="scope">
                                        <el-input type="number" v-model="scope.row.nums" size="small" min="0" :max="scope.row.nums" :value="scope.row.nums"></el-input>
                                    </template>
                                </el-table-column>

                            </el-table>
                        </div>
                    </div>
                </div>

                <!--添加商品信息-->
                <div v-show="showAddGoods">
                    <div class="form-group" >
                        <div class="col-sm-2 control-label"><label>添加商品</label></div>
                        <div class="col-sm-2" >
                            <input type="text" class="form-control input-sm"  placeholder=" 待开发"/>
                        </div>
                    </div>
                </div>


                <div class="form-group" style="padding-top: 15px">
                    <div class="col-sm-4 control-label"></div>
                    <input type="button" class="btn btn-primary  btn-sm" @click="saveOrUpdate" value="确定"/>
                    &nbsp;&nbsp;<input type="button" class="btn btn-warning  btn-sm" @click="dialogRegisterVisible = false" value="取消"/>
                </div>
            </form>
        </div>
    </el-dialog>

</div>

<script src="${request.contextPath}/statics/js/modules/service/serviceRegisterPage.js?_${.now?long}"></script>